﻿using SD.Infrastructure.DTOBase;
using SlamDunk.MES.IAppService.DTOs.Outputs.DefinitionContext;
using SlamDunk.MES.IAppService.DTOs.Outputs.ExecutionContext;
using SlamDunk.MES.IAppService.DTOs.Outputs.PlanContext;
using System;
using System.Runtime.Serialization;

namespace SlamDunk.MES.IAppService.DTOs.Outputs.AcquisitionContext
{
    /// <summary>
    /// 采集会话数据传输对象
    /// </summary>
    [DataContract]
    public class AcquisitionSessionInfo : BaseDTO
    {
        #region 采集规则Id —— Guid AcquisitionRuleId
        /// <summary>
        /// 采集规则Id
        /// </summary>
        [DataMember]
        public Guid AcquisitionRuleId { get; set; }
        #endregion

        #region 采集间隔 —— int Interval
        /// <summary>
        /// 采集间隔（单位：秒）
        /// </summary>
        [DataMember]
        public int Interval { get; set; }
        #endregion

        #region 工艺Id —— Guid? ProcessId
        /// <summary>
        /// 工艺Id
        /// </summary>
        [DataMember]
        public Guid? ProcessId { get; set; }
        #endregion

        #region 工艺段Id —— Guid? ProcessSegmentId
        /// <summary>
        /// 工艺段Id
        /// </summary>
        [DataMember]
        public Guid? ProcessSegmentId { get; set; }
        #endregion

        #region 作业计划Id —— Guid? ExecutionPlanId
        /// <summary>
        /// 作业计划Id
        /// </summary>
        [DataMember]
        public Guid? ExecutionPlanId { get; set; }
        #endregion

        #region 工单Id —— Guid? WorkOrderId
        /// <summary>
        /// 工单Id
        /// </summary>
        [DataMember]
        public Guid? WorkOrderId { get; set; }
        #endregion

        #region 是否活动 —— bool Active
        /// <summary>
        /// 是否活动
        /// </summary>
        [DataMember]
        public bool Active { get; set; }
        #endregion

        #region 激活时间 —— DateTime? ActivatedTime
        /// <summary>
        /// 激活时间
        /// </summary>
        [DataMember]
        public DateTime? ActivatedTime { get; set; }
        #endregion

        #region 关闭时间 —— DateTime? ClosedTime
        /// <summary>
        /// 关闭时间
        /// </summary>
        [DataMember]
        public DateTime? ClosedTime { get; set; }
        #endregion

        #region 关闭原因 —— string ClosedReason
        /// <summary>
        /// 关闭原因
        /// </summary>
        [DataMember]
        public string ClosedReason { get; set; }
        #endregion


        //导航属性

        #region 导航属性 - 工艺 —— ProcessInfo ProcessInfo
        /// <summary>
        /// 导航属性 - 工艺
        /// </summary>
        [DataMember]
        public ProcessInfo ProcessInfo { get; set; }
        #endregion

        #region 导航属性 - 工艺段 —— ProcessSegmentInfo ProcessSegmentInfo
        /// <summary>
        /// 导航属性 - 工艺段
        /// </summary>
        [DataMember]
        public ProcessSegmentInfo ProcessSegmentInfo { get; set; }
        #endregion

        #region 导航属性 - 作业计划 —— ExecutionPlanInfo ExecutionPlanInfo
        /// <summary>
        /// 导航属性 - 作业计划
        /// </summary>
        [DataMember]
        public ExecutionPlanInfo ExecutionPlanInfo { get; set; }
        #endregion

        #region 导航属性 - 工单 —— WorkOrderInfo WorkOrderInfo
        /// <summary>
        /// 导航属性 - 工单
        /// </summary>
        [DataMember]
        public WorkOrderInfo WorkOrderInfo { get; set; }
        #endregion
    }
}
